<template>
  <tr>
    <td>{{ index }}</td>
    <td>{{ item.created_at }}</td>
    <td>{{ item.height }}</td>
    <td>{{ item.weight }}</td>
    <td>{{ item.bmi }}</td>
    <td><a href="javascript:void(0)" @click="handleDelete(item.id)">删除</a></td>
  </tr>
</template>

<script setup>
defineProps({
  index: {
    type: Number,
    default: 1,
  },
  item: {
    type: Object,
    required: true
  }
})

const emit = defineEmits([ 'onDel' ])
const handleDelete = (id) => {
  emit('onDel', id)
}
</script>
